package pagerank;
import java.util.ArrayList;

public class Page implements Comparable<Page> {
	public String id;
	public ArrayList<String> fLinks;
	public ArrayList<String> bLinks = new ArrayList<String>();
	public double oldPageRank;
	public double newPageRank;
	
	public double auth;
	public double hub;
	public ArrayList<Page> incomingNeighbours;
	public ArrayList<Page> outgoingNeighbors;

	public Page(String id, ArrayList<String> fLinks) {
		this.id = id;
		this.fLinks = fLinks;
	}
	
	public Page (Page p){
		this.id = p.id;
		this.fLinks = p.fLinks;
		this.bLinks = p.bLinks;
		this.oldPageRank = p.oldPageRank;
		this.newPageRank = p.newPageRank;
	}

	@Override
	public int compareTo(Page o) {
		return Double.compare(o.newPageRank, newPageRank);
	}
	
	
}
